package com.inspur.security.cbb3.kms.enums;

/**
 * @author: lijunchang
 * @Description: 容器类型，generic、asymmetry、certificate等
 * @Date: 2020/10/19
 */
public enum ContainerType {
    /**
     * 其他
     */
    OTHER,
    /**
     * 通用
     */
    Generic,
    /**
     * 非对称密钥
     */
    Asymmetric,
    /**
     * 证书
     */
    Certificate;

    public static ContainerType getByType(String type){
        for (ContainerType constants : values()) {
            if (constants.name().equalsIgnoreCase(type)) {
                return constants;
            }
        }
        return OTHER;
    }
}
